<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMoneyReportTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('money_report', function (Blueprint $table) {
            $table->increments('id')->comment('主键id');
            $table->integer('uid')->comment('用户id');
            $table->tinyInteger('types')->comment('财务类型，1为见点奖，2为直推奖，3为培育奖，4为量碰奖');
            $table->decimal('amount',10,2)->comment('当前用户操作金额，保留小数点后两位,若是扣减金额即为：-xxx,增加金额即为：xxx ');
            $table->tinyInteger('status')->comment('状态: 1为默认，0为作废');
            $table->string('remark')->nullable()->comment('备注');
            $table->integer('create_time')->comment('创建时间');
            $table->integer('update_time')->nullable()->comment('更新时间');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('money_report');
    }
}
